
function linkedPage(totalPage, currentPage,pageSize) {
	var currentPage = parseInt(currentPage);//当前页
	var totalPage = parseInt(totalPage);//总页数
	var content = '';
	content += '<div class="clearfix" id="pageDivId"><p class="page r"><span class="pre_page">';
	if (currentPage > 1) {
		content = content + '<a href="javascript:commentListInit(null,'
				+ (currentPage - 1) + ','+pageSize+');">上一页</a></span>';
	} else {
		content = content + '上一页</span>';
	}
	
	if(totalPage>6){
		if (currentPage < 4) {
			for (var i = 1; i <= 4; i++) {
				if (currentPage == i) {
					content = content + '<a href="javascript:commentListInit(null,'
							+ i + ','+pageSize+');" class="page_num active"id="' + i
							+ '">' + i + '</a>';
				} else {
					content = content + '<a href="javascript:commentListInit(null,'
							+ i + ','+pageSize+');" class="page_num"  id="' + i + '">'
							+ i + '</a>';
				}
			}
		}else if(currentPage == 4){
			for (var i = 1; i <= 4; i++) {
				if (currentPage == i) {
					content = content + '<a href="javascript:commentListInit(null,'
							+ i + ','+pageSize+');" class="page_num active"id="' + i
							+ '">' + i + '</a>';
				} else {
					content = content + '<a href="javascript:commentListInit(null,'
							+ i + ','+pageSize+');" class="page_num"  id="' + i + '">'
							+ i + '</a>';
				}
			}
		}else{
			content = content + '<a href="javascript:toAccountPage(\'1\','+pageSize+');" class="page_num" id="1">' + 1 + '</a>';
			content = content + '<span class="page_num" >'+ "..." + '</span>';
			if(currentPage==totalPage){
			content = content + '<a href="javascript:commentListInit(null,'
			 		  + (currentPage-3) + ','+pageSize+');" class="page_num"  id="' + (currentPage-2) + '">'
					  + (currentPage-3) + '</a>';
			}
			content = content + '<a href="javascript:commentListInit(null,'
			 		  + (currentPage-2) + ','+pageSize+');" class="page_num"  id="' + (currentPage-2) + '">'
					  + (currentPage-2) + '</a>';
			content = content + '<a href="javascript:commentListInit(null,'
			 		  + (currentPage-1) + ','+pageSize+');" class="page_num"  id="' + (currentPage-1) + '">'
					  + (currentPage-1) + '</a>';
			content = content + '<a href="javascript:commentListInit(null,'
			 		  + currentPage + ','+pageSize+');" class="page_num active"  id="' + currentPage + '">'
					  + currentPage + '</a>';
		}
		if(currentPage!=totalPage && currentPage>3){
			content = content + '<a href="javascript:commentListInit(null,'
			 		  + (currentPage+1) + ','+pageSize+');" class="page_num"  id="' + (currentPage+1) + '">'
					  + (currentPage+1) + '</a>';
		}
		if(currentPage + 2 >= totalPage){
			if(currentPage+2==totalPage){
				content = content + '<a href="javascript:commentListInit(null,'
		 		  + (currentPage+2) + ','+pageSize+');" class="page_num"  id="' + (currentPage+2) + '">'
				  + (currentPage+2) + '</a>';
			}
		}else{
			content = content + '<span class="page_num" >'+ "..." + '</span>';
			content = content + '<a href="javascript:commentListInit(null,'
	 		  + totalPage + ','+pageSize+');" class="page_num"  id="' + totalPage + '">'
			  + totalPage + '</a>';
		}
	}else {
		for (var i = 1; i <= totalPage; i++) {
			if (currentPage == i) {
				content = content + '<a href="javascript:commentListInit(null,' + i
						+ ','+pageSize+');" class="page_num active"id="' + i + '">' + i
						+ '</a>';
			} else {
				content = content + '<a href="javascript:commentListInit(null,' + i
						+ ','+pageSize+');" class="page_num" id="' + i + '">' + i
						+ '</a>';
			}
		}
	}
	content = content + '<span class="next_page">';
	if (currentPage < totalPage) {
		content = content + '<a href="javascript:commentListInit(null,'
				+ (currentPage + 1) + ','+pageSize+');">下一页</a></span>';
	} else {
		content = content + '下一页</span>';
	}
	content += '</p></div>';
	return content;

}